﻿using System.ComponentModel;
using System.Windows;
using TfsComLib.TfsBranchLib2;

namespace TfsBranchLib2.View
{
    /// <summary>
    ///     Interaction logic for TestBranchListEditBoxWindow.xaml
    /// </summary>
    public partial class BranchListEditPopup : Window
    {
        private readonly IBranchedHistory context;

        public BranchListEditPopup()
        {
            InitializeComponent();
        }

        public BranchListEditPopup(IBranchedHistory context) : this()
        {
            branchListEditBox.SetContext(context.SelectedBranchesCache);
            this.context = context;
        }

        private void Window_Closing_1(object sender, CancelEventArgs e)
        {
            context.SelectedBranchesCache.DoRefresh();
        }
    }
}